package com.woniuxy.cloud.carl.marketing.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.woniuxy.cloud.carl.carlgoods.client.SkuQueryClient;
import com.woniuxy.cloud.carl.carlgoods.client.dto.SkuDto;
import com.woniuxy.cloud.carl.marketing.client.param.AddScoreLogParam;
import com.woniuxy.cloud.carl.marketing.client.result.ScoreLogDto;
import com.woniuxy.cloud.carl.marketing.infra.model.*;
import com.woniuxy.cloud.carl.marketing.infra.mapper.ScoreLogMapper;
import com.woniuxy.cloud.carl.marketing.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 积分记录表 服务实现类
 * </p>
 *
 * @author Lucas
 * @since 2023-07-19
 */
@Service
public class ScoreLogServiceImpl extends ServiceImpl<ScoreLogMapper, ScoreLog> implements ScoreLogService {
    @Autowired
    DeductionService deductionService;
    @Autowired
    FullDiscountCouponService fullDiscountCouponService;
    @Autowired
    ServiceCouponService serviceCouponService;

    @Override
    public Result addScoreLog(AddScoreLogParam param) {
        ScoreLog scoreLog = BeanUtil.copyProperties(param, ScoreLog.class);
        scoreLog.setCreateDate(new Date());
        save(scoreLog);
        return Result.success();
    }


}
